package top.digger.web.entity;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DataShPoint {
    private Date date;

    private BigDecimal openPrice;

    private BigDecimal closePrice;

    private BigDecimal maxPrice;

    private BigDecimal minPrice;

    private BigDecimal tradeNumber;

    private String showDate;

    public String getShowDate() {
        if (this.date != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            this.showDate = sdf.format(this.date);
            return this.showDate;
        }
        return "";
    }

    public void setShowDate(String showDate) {
        if (this.date != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            this.showDate = sdf.format(this.date);
        }else{
            this.showDate = showDate;
        }

    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public BigDecimal getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(BigDecimal openPrice) {
        this.openPrice = openPrice;
    }

    public BigDecimal getClosePrice() {
        return closePrice;
    }

    public void setClosePrice(BigDecimal closePrice) {
        this.closePrice = closePrice;
    }

    public BigDecimal getMaxPrice() {
        return maxPrice;
    }

    public void setMaxPrice(BigDecimal maxPrice) {
        this.maxPrice = maxPrice;
    }

    public BigDecimal getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(BigDecimal minPrice) {
        this.minPrice = minPrice;
    }

    public BigDecimal getTradeNumber() {
        return tradeNumber;
    }

    public void setTradeNumber(BigDecimal tradeNumber) {
        this.tradeNumber = tradeNumber;
    }
}